package com.work.shart.web.entity.goods;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.work.shart.common.mybatis.entity.BaseEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

/**
 * <p>
 *
 * </p>
 *
 * @author cong
 * @since 2022-03-22
 */
@Data
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
@Document(indexName = "goods", shards = 6, replicas = 3)
@TableName("goods")
public class GoodsEntity extends BaseEntity<Long> {

    private static final long serialVersionUID = 1L;

    /**
     * 标题
     */
    @TableField("hot_title")
    @ApiModelProperty("标题")
    @Field(type = FieldType.Text)
    private String hotTitle;

    /**
     * 类别id
     */
    @ApiModelProperty("类别id")
    @TableField("classifation_id")
    private Long classifationId;

    /**
     * 缩略图
     */
    @ApiModelProperty("缩略图")
    @TableField("main_url")
    private String mainUrl;

    /**
     * 阅读量
     */
    @ApiModelProperty("阅读量")
    @TableField("reading_volume")
    private Long readingVolume;

    /**
     * 收藏量
     */
    @ApiModelProperty("收藏量")
    @TableField("collection_volume")
    private Long collectionVolume;

    /**
     * 价值多少元
     */
    @ApiModelProperty("价值多少元")
    @TableField("value_price")
    private Long valuePrice;

    /**
     * 单价
     */
    @ApiModelProperty("单价")
    @TableField("price")
    private Double price;

    /**
     * 简要内容
     */
    @ApiModelProperty("简要内容")
    @TableField("text_area")
    @Field(type = FieldType.Text)
    private String textArea;

    /**
     * 摘要
     */
    @ApiModelProperty("摘要")
    @TableField("abstract")
    private String abstractTitle;

}
